package net.cyan.commons.log;

import net.cyan.commons.util.ObjectFactory;

import java.util.List;

/**
 * 
 * @author camel
 * @date 2008-12-10
 */
public class BaseLogFactory implements ObjectFactory<BaseLog>
{
    private String path = "log/log";

    private int fileSize = RollFilePrintable.DEFAULTSIZE;

    private boolean track = true;

    private List<String> noTracks;

    public BaseLogFactory()
    {
    }

    public BaseLog create() throws Exception
    {
        BaseLog log = new BaseLog(track, noTracks);
        log.setPath(path, fileSize);
        return log;
    }

    public String getPath()
    {
        return path;
    }

    public void setPath(String path)
    {
        this.path = path;
    }

    public int getFileSize()
    {
        return fileSize;
    }

    public void setFileSize(int fileSize)
    {
        this.fileSize = fileSize;
    }

    public boolean isTrack()
    {
        return track;
    }

    public void setTrack(boolean track)
    {
        this.track = track;
    }

    public List<String> getNoTracks()
    {
        return noTracks;
    }

    public void setNoTracks(List<String> noTracks)
    {
        this.noTracks = noTracks;
    }
}
